package com.java1412.order.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author java1412
 * @since 2024-04-24 15:53:02
 */
@FeignClient(value = "mall-goods") // feign客户端，value是服务名称
public interface GoodsService {

    @RequestMapping(value = "/api/v1/goods/findByGoodsId")
    public Object findByGoodsId(@RequestParam("goodsId") Integer goodsId);

    // 测试负载均衡机制
    @GetMapping("/api/v1/goods/findClusterName")
    String findClusterName();
}
